

using System;

class Exercise2 {

  static void Main() {
      
      float xDimension = 0, yDimension = 0, area = 0; //declaring and initialising the x, y dimensions of the main figure and the area
      
      Console.WriteLine("This program calculates the area of the figure in the exercise 2 of the assignment.\n");
      
      Console.Write("Enter the X dimension: ");
      float.TryParse(Console.ReadLine(), out xDimension); //reading the x dimension
      
      Console.Write("Enter the Y dimension: ");
      float.TryParse(Console.ReadLine(), out yDimension); //reading the y dimension
      
      area = xDimension * yDimension -7 * yDimension + 17; //calculating the area of the shaded region

      Console.WriteLine("The area of the shaded region is: {0}", area); //printing the area
  }

}
